package cn.ydt.ydt.common.exception;

import cn.ydt.ydt.common.resful.StatusCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 处理业务异常
 */

@Data
//自动生成equals和hashcode方法
@EqualsAndHashCode
public class YdtServiceException extends RuntimeException{

    private StatusCode statusCode;

    public YdtServiceException(StatusCode statusCode,String message){
        super(message);
       setStatusCode(statusCode);
    }
}
